package com.base;

public enum StatusEnum {

    SUCCESS(200, "正常"),
    CHECK(300, "验证通过"),
    ERROR(400, "参数错误"),
    INVALID(401, "token无效"),
    LICENSE(402, "证书无效"),
    NOVISIT(403, "无权访问"),
    CLOSE(404, "网站关闭"),
    SYSTEM(500, "系统错误");

    private final int code;
    private String msg;

    StatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static StatusEnum getStatus(String status) {
        return StatusEnum.valueOf(status);
    }

    public int value() {
        return this.code;
    }

    public int getCode() {
        return code;
    }

    public String getInfo() {
        return msg;
    }

    public void setInfo(String info) {
        this.msg = info;
    }
}
